package com.wtwd.device.model;

import com.alibaba.fastjson.JSON;

import java.util.List;

/**
 * @author zdl
 * @Description
 * @create 2021-08-17 14:42
 */
public class GFWeather {
    private Location location;
    private List<WeatherInfo> weatherInfoList;
    private String last_update; //数据更新时间
    public String toJson(){
        return JSON.toJSONString(this);
    }

    public static class Location {
        private String areacode;
        private String name;
        private String country;

        public String getAreacode() {
            return areacode;
        }

        public void setAreacode(String areacode) {
            this.areacode = areacode;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getCountry() {
            return country;
        }

        public void setCountry(String country) {
            this.country = country;
        }
    }

    public static class WeatherInfo {
        private String text_day;//白天天气现象
        private String code_day;//白天天气现象编码
        private String text_night;//夜间天气现象
        private String code_night;//夜间天气现象编码
        private String high;//日最高气温，单位℃
        private String low;//日最低气温，单位℃
        private String date;//预报日期(当地时间)
        private String pressure; //压强

        public String getText_day() {
            return text_day;
        }

        public void setText_day(String text_day) {
            this.text_day = text_day;
        }

        public String getCode_day() {
            return code_day;
        }

        public void setCode_day(String code_day) {
            this.code_day = code_day;
        }

        public String getText_night() {
            return text_night;
        }

        public void setText_night(String text_night) {
            this.text_night = text_night;
        }

        public String getCode_night() {
            return code_night;
        }

        public void setCode_night(String code_night) {
            this.code_night = code_night;
        }

        public String getHigh() {
            return high;
        }

        public void setHigh(String high) {
            this.high = high;
        }

        public String getLow() {
            return low;
        }

        public void setLow(String low) {
            this.low = low;
        }

        public String getDate() {
            return date;
        }

        public void setDate(String date) {
            this.date = date;
        }

        public String getPressure() {
            return pressure;
        }

        public void setPressure(String pressure) {
            this.pressure = pressure;
        }
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    public List<WeatherInfo> getWeatherInfoList() {
        return weatherInfoList;
    }

    public void setWeatherInfoList(List<WeatherInfo> weatherInfoList) {
        this.weatherInfoList = weatherInfoList;
    }

    public String getLast_update() {
        return last_update;
    }

    public void setLast_update(String last_update) {
        this.last_update = last_update;
    }
}
